package org.huangrui.design.pattern.factory.simple;

public class VehicleFactory {//简单工厂类
    public static Vehicle getVehicle(String type){
        switch (type){
            case "Bike": return new Bike();
            case "Electromobile": return new Electromobile();
            case "Car": return new Car();
        }
        return null;
    }
}
